package JLB_Chapter_11;
interface EnumInterface {
    public String getDescription();
    public int getI();
}
public enum AnyEnum implements EnumInterface {
    Constants_A {
        public String getDescription() {
            return ("我是枚举成员A");
        }
        public int getI() {
            return i;
        }
    },
    Constants_B {
        public String getDescription() {
            return ("我是枚举成员B");
        }
        public int getI() {
            return i;
        }
    },
    Constants_C {
        public String getDescription() {
            return ("我是枚举成员C");
        }
        public int getI() {
            return i;
        }
    },
    Constants_D {
        public String getDescription() {
            return ("我是枚举成员D");
        }
        public int getI() {
            return i;
        }
    };
    private static int i = 5;
    public static void main(String[] args) {
        AnyEnum[] array = AnyEnum.values();
        for(int i = 0; i < array.length; i++) {
            System.out.println(array[i] + ":" + array[i].getDescription());
            System.out.println(array[i] + ":" + array[i].getI());
        }
    }
}
